package cn.lbd.auth.service;

import cn.lbd.auth.entity.*;
import cn.lbd.auth.model.OperatorRole;
import cn.lbd.auth.model.RoleAuth;
import cn.lbd.auth.model.Resource;

import java.util.List;

public interface AdminService {

    /**
     * 根据工号获取操作员信息
     *
     * @param operatorId
     */
    User getOperatorById(Integer operatorId);


    /**
     * 获取操作员归属角色
     *
     * @param operatorId
     * @return
     */
    List<Role> getRoleByOperatorId(Integer operatorId);


    /**
     * 获取所有角色资源关系
     *
     * @return
     */
    List<Resource> getAllRoleResourceRela();

    /**
     * 查找资源路径及其对应的角色
     *
     * @return
     */
    List<ResourceRole> getRoleAliasByResourceUrl();

    int getOrgIdByOperatorId(int operatorId);

    String checkUserLock(String password, String id, int loginType);

    String loginVerify(String password, String id, int loginType);

    void resetErrCount(String id, int loginType);

    User selectOperatorByLoginName(String name);

    // void initRoleAliasByResourceUrl();

    // Map<String, Collection<ConfigAttribute> getResourceRoleMap();

    List<OperatorRole> getOperatorRoleByOperId(Integer operatorId);

    List<RoleAuth> getAuthByRoleId(Integer roleId);

    Resource getResourceByResId(Integer resId);
}
